﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using YogaStudio.Data.Domain;

namespace YogaStudio.WebUI.Models
{
    public class StudentsViewModel
    {
        public virtual Section Section { get; set; }
        public virtual Course Course { get; set; }
        public virtual Faculty Faculty { get; set; }
        public virtual ICollection<Customer> Students { get; set; }
        public static implicit operator StudentsViewModel(KeyValuePair<Section, ICollection<Customer>> item)
        {
            return new StudentsViewModel
            {
                Section = item.Key,
                Course = item.Key.Course,
                Faculty = item.Key.Faculty,
                Students = item.Value
            };
        }
    }
}